<template lang="pug">
  .clearfix
    Modal(
        width="300"
        v-model="isCheckDownloadModal"
        title="下载附件"
        class-name="vertical-center-modal"
    )
        div
          .u-d-info(v-for="(item, index) in fileList" :key="index" @click="handleDownLoad(item)") {{item.name}}
        div(slot="footer")
          Button(@click="cancel") 取消
</template>

<script>

import { constants } from 'fs';
export default {
  name: '',

  props: {
  },

  data () {
    return {
      isCheckDownloadModal: false,
      fileList: [],
      baseUrl: ''
    }
  },

  watch: {
  },

  mounted () {
    
  },

  methods: {
    show () {
      this.isCheckDownloadModal = true
    },
    cancel () {
      this.isCheckDownloadModal = false
    },
    // 附件下载
    handleDownLoad (row) {
      var url = this.baseUrl + '/Attachment/Download?id=' + row.id
      window.open(url, '_blank')
    }
  }
}
</script>

<style lang="less" scope>
    .radiocol{
        width: 100%;
        display: flex;
        flex-direction: row;
        align-items: center;
        .radio-title{
            width: 220px;
        }
        .radio-title:before{
            content: '*';
            display: inline-block;
            margin-right: 4px;
            line-height: 1;
            font-family: SimSun;
            font-size: 14px;
            color: #ed4014;
        }
    }
    .radiocol-tree{
        align-items: flex-start;
        .radio-title{
          width: 140px;
        }
    }
</style>
